package com.onnoa.jenkins.test.controller;

import com.onnoa.jenkins.test.domain.SysMenuDto;
import com.onnoa.jenkins.test.result.ResultBean;
import com.onnoa.jenkins.test.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value = "sys/menu")
public class SysMenuController {


    @Autowired
    private SysMenuService sysMenuService;

    @GetMapping(value = "/getMenuList")
    public ResultBean getMenuList(){
        List<SysMenuDto> menuList = sysMenuService.getMenuList();
        return ResultBean.success(menuList);
    }

}
